package com.yjd.comm.funds.enums;

/**
 * Created by yjd-wap on 2017/9/20.
 */
public enum FundsIncomeEnum {
    NOCHANGE(0, "不变"),
    ADD(1, "增加"),
    REDUCE(-1, "减少");
    private int code;
    private String label;

    public static FundsIncomeEnum parse(int code){
        for (FundsIncomeEnum fundsIncomeEnum : FundsIncomeEnum.values()) {
            if(fundsIncomeEnum.getCode() == code){
                return fundsIncomeEnum;
            }
        }
        return null;
    }

    private FundsIncomeEnum(int code, String label) {
        this.code = code;
        this.label = label;
    }

    public int getCode() {
        return code;
    }
    public void setCode(int code) {
        this.code = code;
    }
    public String getLabel() {
        return label;
    }
    public void setLabel(String label) {
        this.label = label;
    }
}
